package Io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2023-04-05
 * Time: 16:19
 */
public class test2 {
    public static void main(String[] args) throws IOException {
        try (InputStream inputStream = new FileInputStream("hello.txt")){
while (true){
    byte[] buf =new  byte[1000];
    int len;
    len=inputStream.read(buf);
    if(len==-1){
        break;
    }
    for (int i = 0; i < len; i+=3) {
        String s =new String(buf,i,3,"UTF-8");
        System.out.printf("%s",s);
    }
}
        }
    }
}
